#include "D3D9HLSLManager.h"

namespace DreamEngineD3D
{

CD3D9HLSLManager::CD3D9HLSLManager(CD3D9Device* pD3D9Device):
m_pD3D9Device(pD3D9Device)
{
}


CD3D9HLSLManager::~CD3D9HLSLManager(void)
{
}

CGpuProgram* CD3D9HLSLManager::_NewProgramByProfile(ShaderProfile profile)
{
	if (m_pD3D9Device==MATH_NULL)return MATH_NULL;

	switch (profile)
	{
	case SP_PS_2_0:
	case SP_PS_3_0:
		return new CD3D9HLSLFragment(m_pD3D9Device, profile);

	case SP_VS_2_0:
	case SP_VS_3_0:
		return new CD3D9HLSLVertex(m_pD3D9Device, profile);

	default: return MATH_NULL;
	}

	return MATH_NULL;
}

}

